﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteMaster.Master" AutoEventWireup="true"
    CodeBehind="SalesReport.aspx.cs" Inherits="GuessLAB.UI.SalesReport" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">

    <asp:RadioButtonList ID="rdlType" runat ="server" AutoPostBack="true" RepeatDirection="Horizontal"
        RepeatLayout="Table"
    onselectedindexchanged="rdlType_SelectedIndexChanged" 
    ToolTip="Select Required Report Type">
        <asp:ListItem Text="General" Value="1" Selected="True"></asp:ListItem>
        <asp:ListItem Text="Fiscal" Value="2" ></asp:ListItem>
        </asp:RadioButtonList>


    <div style="float: left">
        <asp:Label runat="server" ID="lblStore" >Region:</asp:Label>
        <asp:DropDownList ID="ddlRegion" runat="server">
        </asp:DropDownList>
        &nbsp;&nbsp;
        <asp:Label runat="server" ID="Label1">City:</asp:Label>
        <asp:DropDownList ID="ddlCity" runat="server">
            <asp:ListItem Selected="True"></asp:ListItem>
        </asp:DropDownList>
        

        <div id="divGeneral" runat="server" style="float: left;">
        <asp:Label runat="server" ID="lblYear">Year:</asp:Label>
        <asp:DropDownList ID="ddlYear" runat="server" ToolTip="CalenderYear">
        </asp:DropDownList>
        <asp:Label runat="server" ID="lblMonth">Month:</asp:Label>
        <asp:DropDownList ID="ddlMonth" runat="server" AutoPostBack="true" 
                ToolTip="CalenderMonth" >
        </asp:DropDownList>
        </div>


         <div id="divFiscal" runat="server" visible ="false" style="float: left">
        <asp:Label runat="server" ID="Label2">Year:</asp:Label>
        <asp:DropDownList ID="ddlFiscalYer" runat="server" ToolTip="Fiscal Year">
        </asp:DropDownList>
        <asp:Label runat="server" ID="Label3">Fiscal Num:</asp:Label>
        <asp:DropDownList ID="ddlFisclNum" runat="server" AutoPostBack="true" 
                 ToolTip="Fiscal Period">
        </asp:DropDownList>
        </div>

      <%--  <asp:Label runat="server" ID="lblType">Type:</asp:Label>
        <asp:DropDownList ID="ddlType" runat="server" AutoPostBack="true" >
        <asp:ListItem Text="General" Value="1" Selected="True"></asp:ListItem>
        <asp:ListItem Text ="Fiscal" Value="2"></asp:ListItem>
        </asp:DropDownList>--%>


        <asp:Button ID="btnSummary" runat="server" Text="Summary" 
            OnClick="btnSummary_Click" ToolTip="Click here for summary" />
        <asp:Button ID="btnExport" runat="server" Text="Export" 
            OnClick="btnExport_Click" ToolTip="Click Here exporting to Excel format" />
        <%-- <asp:Label runat="server" ID="Label4">Summary:</asp:Label>--%>
        <br />
        <br />
        <asp:GridView ID="grdList" DataKeyNames="Store_Code" runat="server" 
            AutoGenerateColumns="False" AllowSorting="True" 
            CssClass="Gridview" HeaderStyle-BackColor="#61A6F8" ShowFooter="True" HeaderStyle-Font-Bold="true"
            HeaderStyle-ForeColor="White" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
            Width="100%" BorderWidth="1px" CellPadding="3" HeaderStyle-HorizontalAlign="Center"
            AllowPaging="True" PageSize="20" OnPageIndexChanging="grdList_PageIndexChanging"
            OnRowCancelingEdit="grdList_RowCancelingEdit" OnRowDeleting="grdList_RowDeleting"
            OnRowEditing="grdList_RowEditing" OnRowUpdating="grdList_RowUpdating" OnRowUpdated="grdList_RowUpdated"
            OnRowCommand="grdList_RowCommand" EnableModelValidation="True">
            <Columns>
                <asp:TemplateField HeaderText="Store" HeaderStyle-HorizontalAlign="Center" ItemStyle-Wrap="false">
                    <ItemTemplate>
                        <asp:LinkButton ID="LBEStoreId" runat="server" CausesValidation="False" CommandName="Store_Code"
                            Text='<%# Bind("Store_Name") %>' CommandArgument='<%# Bind("Store_Code") %>'></asp:LinkButton>
                    </ItemTemplate>
                    <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" />
                </asp:TemplateField>
                <asp:BoundField DataField="Store_Code" HeaderText="StoreId" Visible="false" />
                <asp:BoundField DataField="Store_Name" HeaderText="Store Name" Visible="false" />
                <asp:BoundField DataField="City" HeaderText="City">
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Region" HeaderText="Region">
                <HeaderStyle HorizontalAlign="Center" />
                    <ItemStyle HorizontalAlign="Left" />
                </asp:BoundField>
                <asp:BoundField DataField="Total" HeaderText="Total" DataFormatString="{0:N}">
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
                <asp:BoundField DataField="Rent" HeaderText="Rent" DataFormatString="{0:N}">
                    <ItemStyle HorizontalAlign="Right" />
                </asp:BoundField>
            </Columns>
            <FooterStyle BackColor="White" ForeColor="#000066" />
            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" HorizontalAlign="Justify">
            </HeaderStyle>
            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
            <RowStyle ForeColor="#000066" />
            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
            <%--<SortedAscendingCellStyle BackColor="#F1F1F1" />
      <SortedAscendingHeaderStyle BackColor="#007DBB" />
      <SortedDescendingCellStyle BackColor="#CAC9C9" />
      <SortedDescendingHeaderStyle BackColor="#00547E"/>--%>
        </asp:GridView>
</asp:Content>
